/**
 * 
 */
package com.cvlep.mts.servlet;

import java.io.IOException;

import javax.servlet.GenericServlet;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import org.cometd.Bayeux;

import com.cvlep.appbase.log.MTSLogger;
import com.cvlep.mts.service.MTSService;
import com.cvlep.mts.service.Monitor;

/**
 * @author Otupia
 * 
 */
public class MTSServlet extends GenericServlet
{

	/*
	 * (non-Javadoc)
	 * 
	 * @see javax.servlet.GenericServlet#service(javax.servlet.ServletRequest,
	 * javax.servlet.ServletResponse)
	 */
	
	@Override 
	public void init() throws ServletException
	{
		super.init();
		MTSLogger.info("Logger started!!");
		System.out.println("init mts servlet");
		Bayeux bayeux = (Bayeux) this.getServletContext().getAttribute(Bayeux.ATTRIBUTE);
		System.out.println("bayeux :: " + bayeux);
		new MTSService(bayeux);
		new Monitor(bayeux);
		
	}
	
	@Override
	public void service(ServletRequest arg0, ServletResponse arg1) throws ServletException, IOException
	{
		System.out.println("lallaaa");
	}

	

}
